package com.example.springboot_demo.service;

import com.example.springboot_demo.dto.Goods;
import com.example.springboot_demo.dto.request.GoodsRequest;
import com.example.springboot_demo.dto.request.GoodsSearchRequest;
import com.example.springboot_demo.utils.AjaxResult;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;
import java.util.List;

/**
 * <P> @Author: SongKeCheng
 * <P> Description:
 * <P> Type: Interface
 * <P> Date: 2024/6/22:10:02
 */

public interface GoodsService {


    AjaxResult findGoods(GoodsRequest goodsRequest);

    AjaxResult deleteGoods(GoodsRequest goodsRequest);

    AjaxResult updateGoods(GoodsRequest goodsRequest);

    AjaxResult addGoods(GoodsRequest goodsRequest) throws IOException;

    AjaxResult testTransactional1(GoodsRequest goods) throws IOException;

    @Transactional(rollbackFor = Exception.class)
    AjaxResult testTransactional2(GoodsRequest goods) throws IOException;
}
